package org.dodos2d.types;


public class DDSize {
    public float width, height;

    private DDSize() {
        this(0, 0);
    }

    private DDSize(float w, float h) {
        width = w;
        height = h;
    }

    public static DDSize make(float w, float h) {
        return new DDSize(w, h);
    }

    public static DDSize zero() {
        return new DDSize(0, 0);
    }
    
	public void set(DDSize s) {  	
		width = s.width; 
		height = s.height;
	}
	
	public void set(float w, float h) {  	
		width = w; 
		height = h;
	}
	
	private static DDSize ZERO_SIZE = DDSize.zero();
	public static DDSize getZero() {
		return ZERO_SIZE;
	}
	
    public float getWidth() {
        return width;
    }

    public float getHeight() {
        return height;
    }

    public static boolean equalToSize(DDSize s1, DDSize s2) {
        return s1.width == s2.width && s1.height == s2.height;
    }

    public String toString() {
        return "<" + width + ", " + height + ">";
    }
}
